package com.wanlian.netty.File.msg;


import com.wanlian.json.JsonStringUtil;
import com.wanlian.netty.File.model.BaseHead;

public class FileBaseMsg {
    private BaseHead baseHead;
    private byte[] data;


    public FileBaseMsg() {
        this.baseHead = new BaseHead();
    }

    public void setType(String msgType) {
        this.baseHead.setType(msgType);
    }

    public String getType() {
        return this.baseHead.getType();
    }

    public void setContent(String content) {
        this.baseHead.setContent(content);
    }

    public String getContent() {
        String data = JsonStringUtil.writeValueAsString(this.baseHead);
        return data;
    }

    public byte[] getData() {
        return data;
    }

    public void setData(byte[] data) {
        this.data = data;
    }

    public BaseHead getBaseHead() {
        return baseHead;
    }

    public void setBaseHead(BaseHead baseHead) {
        this.baseHead = baseHead;
    }

    public String toString() {
        return JsonStringUtil.writeValueAsString(this);
    }

}
